package evolution;

import java.util.List;

import org.jgap.Configuration;
import org.jgap.Gene;
import org.jgap.InvalidConfigurationException;
import org.jgap.impl.CompositeGene;
import org.jgap.impl.IntegerGene;

import bangor.aiia.jge.population.InvalidPhenotypeException;

public class CodonGene extends CompositeGene{
	public int index;
	public int maxWraps;
	public int currentWrap;

	public CodonGene(Configuration a_config, int range, int length, int maxWraps)
			throws InvalidConfigurationException {
		super(a_config);
		for(int i = 0; i < length; i++){
			this.addGene(new IntegerGene(a_config, 0, 3));
		}
		index = 0;
		currentWrap = 0;
		this.maxWraps = maxWraps;
	}
	
	public String toString() {
		String str = super.toString();
		str.replaceAll("CompositeGene", "CodonGene");
		return str;
	}
		
}
